using System;
using System.Runtime.Serialization;
namespace AppToolKit.Model.Validation
{
	[Serializable]
	public class ValidateResult : ISerializable
	{
		public string type;
		public string filed;
		public string message;
		public static ValidateResult Error(string type, string message, string filed)
		{
			return new ValidateResult
			{
				filed = filed,
				message = message,
				type = type
			};
		}
		public static ValidateResult Error(string message)
		{
			return new ValidateResult
			{
				message = message
			};
		}
		public void GetObjectData(SerializationInfo info, StreamingContext context)
		{
			info.AddValue("field", this.filed);
			info.AddValue("message", this.message);
			info.AddValue("type", this.type);
		}
		public ValidateResult(SerializationInfo info, StreamingContext context)
		{
			this.filed = info.GetString("field");
			this.message = info.GetString("message");
			this.type = info.GetString("type");
		}
		public ValidateResult()
		{
		}
	}
}
